import java.util.Scanner;

public class demo {
    public static void main(String[] args) {
        System.out.println("输入两个整数，我会判断之间的数是否为质数");
        Scanner sc = new Scanner(System.in);
        int shou = sc.nextInt();
        Scanner sc1 = new Scanner(System.in);
        int wei = sc1.nextInt();
        for (int i = shou; i < wei; i++) {
            boolean flag = true;
            for (int j = 2; j < i; j++) {
                if (i % j == 0) {
                    flag = false;
                    break;
                }
            }
            if (flag) {
                System.out.println(i + "是质数");
            }else{
                System.out.println(i+"不是质数");
            }
        }
    }
}
